<!DOCTYPE html>
<html>
<head>
	<title></title>
	<script type="text/javascript" src="lib/easeljs-0.7.1.min.js"></script>
	<script type="text/javascript" src="lib/tweenjs-0.5.1.min.js"></script>
	<script type="text/javascript" src="lib/movieclip-0.7.1.min.js"></script>
</head>
<body onload="init()">
	<canvas id="mycanvas" width="500px" height="500px" style="border:1px solid black;"></canvas>
</body>
</html>

<script type="text/javascript">
	var data = {
    "images": ["images/pig_0.png", "images/pig_1.png"],
    "frames": [
        [2, 2, 252, 252, 0, -61, -127],
        [258, 2, 252, 252, 0, -61, -127],
        [514, 2, 252, 252, 0, -61, -127],
        [770, 2, 252, 252, 0, -61, -127],
        [1026, 2, 252, 252, 0, -61, -127],
        [1282, 2, 252, 252, 0, -61, -127],
        [1538, 2, 252, 252, 0, -61, -127],
        [1794, 2, 252, 252, 0, -61, -127],
        [2, 258, 252, 252, 0, -61, -127],
        [258, 258, 252, 252, 0, -61, -127],
        [514, 258, 252, 252, 0, -61, -127],
        [770, 258, 252, 252, 0, -61, -127],
        [1026, 258, 252, 252, 0, -61, -127],
        [1282, 258, 252, 252, 0, -61, -127],
        [1538, 258, 252, 252, 0, -61, -127],
        [1794, 258, 252, 252, 0, -61, -127],
        [2, 514, 252, 252, 0, -61, -127],
        [258, 514, 252, 252, 0, -61, -127],
        [514, 514, 252, 252, 0, -61, -127],
        [770, 514, 252, 252, 0, -61, -127],
        [1026, 514, 252, 252, 0, -61, -127],
        [1282, 514, 252, 252, 0, -61, -127],
        [1538, 514, 252, 252, 0, -61, -127],
        [1794, 514, 252, 252, 0, -61, -127],
        [2, 770, 252, 252, 0, -61, -127],
        [258, 770, 252, 252, 0, -61, -127],
        [514, 770, 252, 252, 0, -61, -127],
        [770, 770, 252, 252, 0, -61, -127],
        [1026, 770, 252, 252, 0, -61, -127],
        [1282, 770, 252, 252, 0, -61, -127],
        [1538, 770, 252, 252, 0, -61, -127],
        [1794, 770, 252, 252, 0, -61, -127],
        [2, 1026, 252, 252, 0, -61, -127],
        [258, 1026, 252, 252, 0, -61, -127],
        [514, 1026, 252, 252, 0, -61, -127],
        [770, 1026, 252, 252, 0, -61, -127],
        [1026, 1026, 252, 252, 0, -61, -127],
        [1282, 1026, 252, 252, 0, -61, -127],
        [1538, 1026, 252, 252, 0, -61, -127],
        [1794, 1026, 252, 252, 0, -61, -127],
        [2, 1282, 252, 252, 0, -61, -127],
        [258, 1282, 252, 252, 0, -61, -127],
        [514, 1282, 252, 252, 0, -61, -127],
        [770, 1282, 252, 252, 0, -61, -127],
        [1026, 1282, 252, 252, 0, -61, -127],
        [1282, 1282, 252, 252, 0, -61, -127],
        [1538, 1282, 252, 252, 0, -61, -127],
        [1794, 1282, 252, 252, 0, -61, -127],
        [2, 1538, 252, 252, 0, -61, -127],
        [258, 1538, 252, 252, 0, -61, -127],
        [514, 1538, 252, 252, 0, -61, -127],
        [770, 1538, 252, 252, 0, -61, -127],
        [1026, 1538, 252, 252, 0, -61, -127],
        [1282, 1538, 252, 252, 0, -61, -127],
        [1538, 1538, 252, 252, 0, -61, -127],
        [1794, 1538, 252, 252, 0, -61, -127],
        [2, 1794, 252, 252, 0, -61, -127],
        [258, 1794, 252, 252, 0, -61, -127],
        [514, 1794, 252, 252, 0, -61, -127],
        [770, 1794, 252, 252, 0, -61, -127],
        [1026, 1794, 252, 252, 0, -61, -127],
        [1282, 1794, 252, 252, 0, -61, -127],
        [1538, 1794, 252, 252, 0, -61, -127],
        [1794, 1794, 252, 252, 0, -61, -127],
        [2, 2, 252, 252, 1, -61, -127],
        [258, 2, 252, 252, 1, -61, -127],
        [514, 2, 252, 252, 1, -61, -127],
        [770, 2, 252, 252, 1, -61, -127],
        [1026, 2, 252, 252, 1, -61, -127],
        [1282, 2, 252, 252, 1, -61, -127],
        [1538, 2, 252, 252, 1, -61, -127],
        [1794, 2, 252, 252, 1, -61, -127],
        [2, 258, 252, 252, 1, -61, -127],
        [258, 258, 252, 252, 1, -61, -127],
        [514, 258, 252, 252, 1, -61, -127],
        [770, 258, 252, 252, 1, -61, -127],
        [1026, 258, 252, 252, 1, -61, -127],
        [1282, 258, 252, 252, 1, -61, -127],
        [1538, 258, 252, 252, 1, -61, -127],
        [1794, 258, 252, 252, 1, -61, -127],
        [2, 514, 252, 252, 1, -61, -127],
        [258, 514, 252, 252, 1, -61, -127],
        [514, 514, 252, 252, 1, -61, -127],
        [770, 514, 252, 252, 1, -61, -127],
        [1026, 514, 252, 252, 1, -61, -127],
        [1282, 514, 252, 252, 1, -61, -127],
        [1538, 514, 252, 252, 1, -61, -127],
        [1794, 514, 252, 252, 1, -61, -127],
        [2, 770, 252, 252, 1, -61, -127],
        [258, 770, 252, 252, 1, -61, -127],
        [514, 770, 252, 252, 1, -61, -127],
        [770, 770, 252, 252, 1, -61, -127],
        [1026, 770, 252, 252, 1, -61, -127],
        [1282, 770, 252, 252, 1, -61, -127],
        [1538, 770, 252, 252, 1, -61, -127],
        [1794, 770, 252, 252, 1, -61, -127],
        [2, 1026, 252, 252, 1, -61, -127],
        [258, 1026, 252, 252, 1, -61, -127],
        [514, 1026, 252, 252, 1, -61, -127],
        [770, 1026, 252, 252, 1, -61, -127],
        [1026, 1026, 252, 252, 1, -61, -127],
        [1282, 1026, 252, 252, 1, -61, -127],
        [1538, 1026, 252, 252, 1, -61, -127],
        [1794, 1026, 252, 252, 1, -61, -127],
        [2, 1282, 252, 252, 1, -61, -127],
        [258, 1282, 252, 252, 1, -61, -127],
        [514, 1282, 252, 252, 1, -61, -127],
        [770, 1282, 252, 252, 1, -61, -127],
        [1026, 1282, 252, 252, 1, -61, -127],
        [1282, 1282, 252, 252, 1, -61, -127],
        [1538, 1282, 252, 252, 1, -61, -127],
        [1794, 1282, 252, 252, 1, -61, -127],
        [2, 1538, 252, 252, 1, -61, -127],
        [258, 1538, 252, 252, 1, -61, -127],
        [514, 1538, 252, 252, 1, -61, -127],
        [770, 1538, 252, 252, 1, -61, -127],
        [1026, 1538, 252, 252, 1, -61, -127],
        [1282, 1538, 252, 252, 1, -61, -127],
        [1538, 1538, 252, 252, 1, -61, -127],
        [1794, 1538, 252, 252, 1, -61, -127],
        [2, 1794, 252, 252, 1, -61, -127],
        [258, 1794, 252, 252, 1, -61, -127],
        [514, 1794, 252, 252, 1, -61, -127],
        [770, 1794, 252, 252, 1, -61, -127],
        [1026, 1794, 252, 252, 1, -61, -127],
        [1282, 1794, 252, 252, 1, -61, -127],
        [1538, 1794, 252, 252, 1, -61, -127]
    ],
    "animations": {
        "all": {
            "speed":.1,
            "frames": [
                0,
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
                13,
                14,
                15,
                16,
                17,
                18,
                19,
                20,
                21,
                22,
                23,
                24,
                25,
                26,
                27,
                28,
                29,
                30,
                31,
                32,
                33,
                34,
                35,
                36,
                37,
                38,
                39,
                40,
                41,
                42,
                43,
                44,
                45,
                46,
                47,
                48,
                49,
                50,
                51,
                52,
                53,
                54,
                55,
                56,
                57,
                58,
                59,
                60,
                61,
                62,
                63,
                64,
                65,
                66,
                67,
                68,
                69,
                70,
                71,
                72,
                73,
                74,
                75,
                76,
                77,
                78,
                79,
                80,
                81,
                82,
                83,
                84,
                85,
                86,
                87,
                88,
                89,
                90,
                91,
                92,
                93,
                94,
                95,
                96,
                97,
                98,
                99,
                100,
                101,
                102,
                103,
                104,
                105,
                106,
                107,
                108,
                109,
                110,
                111,
                112,
                113,
                114,
                115,
                116,
                117,
                118,
                119,
                120,
                121,
                122,
                123,
                124,
                125,
                126,
                0
            ]
        }
    }
}

	var stage;s
	function init() {
		stage = new createjs.Stage(document.getElementById('mycanvas'));
		createjs.Ticker.setFPS(60);
		createjs.Ticker.addEventListener("tick",runGame);
		var ss = new createjs.SpriteSheet(data);
		s = new createjs.Sprite(ss,"all");
		stage.addChild(s)
	}

	function runGame() {
		s.y += 1;
		s.x += 1;
		stage.update();
		if(s.y > stage.canvas.height) {
			s.x = s.y = 0
		}
	}
</script>